//package com.alibaba.citrus.cr.ultron;
//
//import com.alibaba.astore.protocol.ultronage.bootstrap.UltronFlowEngine;
//import com.alibaba.lattice2.epoch.meshflow.model.client.EpochUltronService;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//import org.springframework.web.servlet.mvc.method.RequestMappingInfo;
//import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.lang.reflect.Method;
//import java.util.HashMap;
//import java.util.Map;
//
//@Component
//public class EpochUltronServiceImpl implements EpochUltronService {
//    private static final Logger LOGGER = LoggerFactory.getLogger(EpochUltronServiceImpl.class);
//
//    @Autowired
//    private RequestMappingHandlerMapping requestMappingHandlerMapping;
//
//    @Override
//    public void registerController(String path, Object handler, Method method) {
//        LOGGER.error("crm start to register ultron controller...");
//        RequestMappingInfo mappingInfo = RequestMappingInfo.paths(path).build();
//        requestMappingHandlerMapping.registerMapping(mappingInfo, handler, method);
//        LOGGER.error("crm register ultron controller end");
//    }
//
//    @Override
//    public String getAppCode() {
//        return "bc_ots";
//    }
//
//    @Override
//    public Map<String, Object> getRequestContext(HttpServletRequest request, HttpServletResponse response) {
//        return new HashMap<>();
//    }
//
//    @Override
//    public String getModeType() {
//        return "none";
//    }
//
//    @Override
//    public UltronFlowEngine getUltronFlowEngine() {
//        return UltronRenderFactory.getUltronFlowEngine();
//    }
//
//    @Override
//    public ClassLoader getClassLoader() {
//        return UltronRenderFactory.getUltronFlowEngine().getClass().getClassLoader();
//    }
//
//}
